package com.zhaoyh.service;

import com.zhaoyh.bean.IncomeRecord;
import com.zhaoyh.mapper.IncomeRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 祥霸
 * @date 2019/2/12
 */
@Service
public class IncomeRecordService {

    @Autowired
    IncomeRecordMapper incomeRecordMapper;

    public List<IncomeRecord> listIncomeRecord(Integer offset, Integer limit) {
        return incomeRecordMapper.selectByLimitAndOffset(offset,limit);
    }

    public int getCount() {
        return incomeRecordMapper.count();
    }
}
